package com.miplus.ccrm.core.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName wf_caseactions
 */
@TableName(value ="wf_caseactions")
@Data
@KeySequence(value ="SEQ_WF_WORKFLOW")
public class WfCaseactions implements Serializable {
    /**
     * 实例动作ID
     */
    @TableId(type = IdType.INPUT)
    private Integer caseactid;

    /**
     * 实例ID
     */
    private Integer caseid;

    /**
     * 步骤ID
     */
    private Integer stepid;

    /**
     * 动作ID
     */
    private Integer actionid;

    /**
     * 动作类型
     */
    private String actiontype;

    /**
     * 动作时间
     */
    private Date actiondt;

    /**
     * 动作人
     */
    private String actionusr;

    /**
     * 意见
     */
    private String note;

    /**
     * 上一实例动作ID
     */
    private Integer precaseactid;

    /**
     * 创建时间
     */
    private Date crdt;

    /**
     * 创建人
     */
    private String crusr;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WfCaseactions other = (WfCaseactions) that;
        return (this.getCaseactid() == null ? other.getCaseactid() == null : this.getCaseactid().equals(other.getCaseactid()))
            && (this.getCaseid() == null ? other.getCaseid() == null : this.getCaseid().equals(other.getCaseid()))
            && (this.getStepid() == null ? other.getStepid() == null : this.getStepid().equals(other.getStepid()))
            && (this.getActionid() == null ? other.getActionid() == null : this.getActionid().equals(other.getActionid()))
            && (this.getActiontype() == null ? other.getActiontype() == null : this.getActiontype().equals(other.getActiontype()))
            && (this.getActiondt() == null ? other.getActiondt() == null : this.getActiondt().equals(other.getActiondt()))
            && (this.getActionusr() == null ? other.getActionusr() == null : this.getActionusr().equals(other.getActionusr()))
            && (this.getNote() == null ? other.getNote() == null : this.getNote().equals(other.getNote()))
            && (this.getPrecaseactid() == null ? other.getPrecaseactid() == null : this.getPrecaseactid().equals(other.getPrecaseactid()))
            && (this.getCrdt() == null ? other.getCrdt() == null : this.getCrdt().equals(other.getCrdt()))
            && (this.getCrusr() == null ? other.getCrusr() == null : this.getCrusr().equals(other.getCrusr()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCaseactid() == null) ? 0 : getCaseactid().hashCode());
        result = prime * result + ((getCaseid() == null) ? 0 : getCaseid().hashCode());
        result = prime * result + ((getStepid() == null) ? 0 : getStepid().hashCode());
        result = prime * result + ((getActionid() == null) ? 0 : getActionid().hashCode());
        result = prime * result + ((getActiontype() == null) ? 0 : getActiontype().hashCode());
        result = prime * result + ((getActiondt() == null) ? 0 : getActiondt().hashCode());
        result = prime * result + ((getActionusr() == null) ? 0 : getActionusr().hashCode());
        result = prime * result + ((getNote() == null) ? 0 : getNote().hashCode());
        result = prime * result + ((getPrecaseactid() == null) ? 0 : getPrecaseactid().hashCode());
        result = prime * result + ((getCrdt() == null) ? 0 : getCrdt().hashCode());
        result = prime * result + ((getCrusr() == null) ? 0 : getCrusr().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", caseactid=").append(caseactid);
        sb.append(", caseid=").append(caseid);
        sb.append(", stepid=").append(stepid);
        sb.append(", actionid=").append(actionid);
        sb.append(", actiontype=").append(actiontype);
        sb.append(", actiondt=").append(actiondt);
        sb.append(", actionusr=").append(actionusr);
        sb.append(", note=").append(note);
        sb.append(", precaseactid=").append(precaseactid);
        sb.append(", crdt=").append(crdt);
        sb.append(", crusr=").append(crusr);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}